package com.example.demo.thread.finals.safecar;


/**
 * 使用不可变类实现线程安全
 *
 * @author luowj12
 * @since 2021/6/30 17:06
 */
public class TestMain2 {
    public static void main(String[] args) {
        CarLocationTracker carLocationTracker = new CarLocationTracker();
        carLocationTracker.setLocationMap("小车A",111,222);
        Location2 location = carLocationTracker.getLocation("小车A");
        System.out.println(location.toString());
    }
}
